User search based on private information

ABSTRACT

In one embodiment, a method includes receiving, from a first user, a query specifying one or more criteria; accessing a data store comprising information associated with one or more users of a social-networking system; identifying a second user from a plurality of users of the social-networking system based on private information stored in the data store and the one or more criteria, wherein the private information is not viewable by the first user; and sending, to the first user, substitute information associated with the second user in place of the private information, the substitute information being information that is viewable by the first user.

PRIORIT

This application is a continuation under 35 U.S.C. § 120 of U.S. patentapplication Ser. No. 13/651,734, filed 15 Oct. 2012.

TECHNICAL FIELD

This disclosure generally relates to searching for and locating userswho satisfy one or more criteria

BACKGROUND

A social-networking system, which may include a social-networkingwebsite, may enable its users (such as persons or organizations) tointeract with it and with each other through it. The social-networkingsystem may, with input from a user, create and store in thesocial-networking system a user profile associated with the user. Theuser profile may include social and family connections, demographicinformation, communication-channel information, and information onpersonal interests of the user. A user may query the social-networkingsystem to search for other users who satisfy some criteria (e.g., inorder to locate families or friends).

SUMMARY OF PARTICULAR EMBODIMENTS

In particular embodiments, upon receiving a query that specifies a givenname and a surname, a social-networking system searches among its usersto locate those specific users such that each located user's given nameand surname, according to the user's profile at the social-networkingsystem, match the given name and surname specified in the queryrespectively. In addition, the social-networking system also locatesthose specific users where each located user's given name matches thegiven name specified in the query, but whose surname does not match thesurname specified in the query, and yet who has at least one familyconnection whose surname matches the surname specified in the query.

In particular embodiments, upon receiving a query that specifies one ormore criteria, a social-networking system searches among its users tolocate those specific users who satisfy the criteria based oninformation associated with each user stored in the social-networkingsystem. The information associated with each user may include public orprivate information of the user (e.g., as specified by the user'sprivacy settings). If the private information of a user is used whiledetermining whether the user satisfies the criteria, the privateinformation of the user is obfuscated (e.g., with suitable substituteinformation) if and when the user is presented in order to protect theuser's privacy.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment associated with asocial-networking system.

FIG. 2 illustrates an example social graph.

FIG. 3 illustrates an example method for locating users based on familyconnections.

FIG. 4 illustrates an example method for locating users basedinformation stored in a social-networking system.

FIG. 5 illustrates an example search result.

FIG. 6 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

A social-networking system may have any number of users. Each user mayhave associated information (e.g., friend and family connections,demographic and background information, hobbies and interests,activates, communications, etc.) stored in the social-networking system.The social-networking system may search for and locate specific usersbased on the user information stored therein.

FIG. 1 illustrates an example network environment 100 associated with asocial-networking system. Network environment 100 includes a user 101, aclient system 130, a social-networking system 160, and a third-partysystem 170 connected to each other by a network 110. Although FIG. 1illustrates a particular arrangement of user 101, client system 130,social-networking system 160, third-party system 170, and network 110,this disclosure contemplates any suitable arrangement of user 101,client system 130, social-networking system 160, third-party system 170,and network 110. As an example and not by way of limitation, two or moreof client system 130, social-networking system 160, and third-partysystem 170 may be connected to each other directly, bypassing network110. As another example, two or more of client system 130,social-networking system 160, and third-party system 170 may bephysically or logically co-located with each other in whole or in part.Moreover, although FIG. 1 illustrates a particular number of users 101,client systems 130, social-networking systems 160, third-party systems170, and networks 110, this disclosure contemplates any suitable numberof users 101, client systems 130, social-networking systems 160,third-party systems 170, and networks 110. As an example and not by wayof limitation, network environment 100 may include multiple users 101,client system 130, social-networking systems 160, third-party systems170, and networks 110.

In particular embodiments, user 101 may be an individual (human user),an entity (e.g., an enterprise, business, or third-party application),or a group (e.g., of individuals or entities) that interacts orcommunicates with or over social-networking system 160. In particularembodiments, social-networking system 160 may be a network-addressablecomputing system hosting an online social network. Social-networkingsystem 160 may generate, store, receive, and transmit social-networkingdata, such as, for example, user-profile data, concept-profile data,social-graph information, or other suitable data related to the onlinesocial network. Social-networking system 160 may be accessed by theother components of network environment 100 either directly or vianetwork 110. In particular embodiments, social-networking system 160 mayinclude an authorization server that allows users 101 to opt in or optout of having their actions logged by social-networking system 160 orshared with other systems (e.g., third-party systems 170), such as, forexample, by setting appropriate privacy settings. In particularembodiments, third-party system 170 may be a network-addressablecomputing system that can host various types of applications.Third-party system 170 may generate, store, receive, and transmitvarious types of data, such as, for example, data associated with theapplications hosted by third-party system 170. Third-party system 170may be accessed by the other components of network environment 100either directly or via network 110. In particular embodiments, one ormore users 101 may use one or more client systems 130 to access, senddata to, and receive data from social-networking system 160 orthird-party system 170. Client system 130 may access social-networkingsystem 160 or third-party system 170 directly, via network 110, or via athird-party system. As an example and not by way of limitation, clientsystem 130 may access third-party system 170 via social-networkingsystem 160. Client system 130 may be any suitable computing device, suchas, for example, a personal computer, a laptop computer, a cellulartelephone, a smartphone, or a tablet computer.

This disclosure contemplates any suitable network 110. As an example andnot by way of limitation, one or more portions of network 110 mayinclude an ad hoc network, an intranet, an extranet, a virtual privatenetwork (VPN), a local area network (LAN), a wireless LAN (WLAN), a widearea network (WAN), a wireless WAN (WWAN), a metropolitan area network(MAN), a portion of the Internet, a portion of the Public SwitchedTelephone Network (PSTN), a cellular telephone network, or a combinationof two or more of these. Network 110 may include one or more networks110.

Links 150 may connect client system 130, social-networking system 160,and third-party system 170 to communication network 110 or to eachother. This disclosure contemplates any suitable links 150. Inparticular embodiments, one or more links 150 include one or morewireline (such as for example Digital Subscriber Line (DSL) or Data OverCable Service Interface Specification (DOCSIS)), wireless (such as forexample Wi-Fi or Worldwide Interoperability for Microwave Access(WiMAX)), or optical (such as for example Synchronous Optical Network(SONET) or Synchronous Digital Hierarchy (SDH)) links. In particularembodiments, one or more links 150 each include an ad hoc network, anintranet, an extranet, a VPN, a LAN, a WLAN, a WAN, a WWAN, a MAN, aportion of the Internet, a portion of the PSTN, a cellulartechnology-based network, a satellite communications technology-basednetwork, another link 150, or a combination of two or more such links150. Links 150 need not necessarily be the same throughout networkenvironment 100. One or more first links 150 may differ in one or morerespects from one or more second links 150.

Social-networking system 160 may store various types of information,including information associated with its users. For example, each userof social-networking system 160 may have a user profile. Each user mayalso upload data to social-networking system 160 for storage,communicate through social-networking system 160, perform activates inconnection with social-networking system 160, and so on. In particularembodiments, the information may be stored in a graph structure,commonly referred to as a “social graph”.

FIG. 2 illustrates example social graph 200. In particular embodiments,social-networking system 160 may store one or more social graphs 200 inone or more data stores. In particular embodiments, social graph 200 mayinclude multiple nodes—which may include multiple user nodes 202 ormultiple concept nodes 204—and multiple edges 206 connecting the nodes.Example social graph 200 illustrated in FIG. 2 is shown, for didacticpurposes, in a two-dimensional visual map representation. In particularembodiments, a social-networking system 160, client system 130, orthird-party system 170 may access social graph 200 and relatedsocial-graph information for suitable applications. The nodes and edgesof social graph 200 may be stored as data objects, for example, in adata store (such as a social-graph database). Such a data store mayinclude one or more searchable or queryable indexes of nodes or edges ofsocial graph 200.

In particular embodiments, a user node 202 may correspond to a user ofsocial-networking system 160. As an example and not by way oflimitation, a user may be an individual (human user), an entity (e.g.,an enterprise, business, or third-party application), or a group (e.g.,of individuals or entities) that interacts or communicates with or oversocial-networking system 160. In particular embodiments, when a userregisters for an account with social-networking system 160,social-networking system 160 may create a user node 202 corresponding tothe user, and store the user node 202 in one or more data stores. Usersand user nodes 202 described herein may, where appropriate, refer toregistered users and user nodes 202 associated with registered users. Inaddition or as an alternative, users and user nodes 202 described hereinmay, where appropriate, refer to users that have not registered withsocial-networking system 160. In particular embodiments, a user node 202may be associated with information provided by a user or informationgathered by various systems, including social-networking system 160. Asan example and not by way of limitation, a user may provide his or hername, profile picture, contact information, birth date, sex, maritalstatus, family status, employment, education background, preferences,interests, or other demographic information. In particular embodiments,a user node 202 may be associated with one or more data objectscorresponding to information associated with a user. In particularembodiments, a user node 202 may correspond to one or more webpages.

In particular embodiments, a concept node 204 may correspond to aconcept. As an example and not by way of limitation, a concept maycorrespond to a place (such as, for example, a movie theater,restaurant, landmark, or city); a website (such as, for example, awebsite associated with social-network system 160 or a third-partywebsite associated with a web-application server); an entity (such as,for example, a person, business, group, sports team, or celebrity); aresource (such as, for example, an audio file, video file, digitalphoto, text file, structured document, or application) which may belocated within social-networking system 160 or on an external server,such as a web-application server; real or intellectual property (suchas, for example, a sculpture, painting, movie, game, song, idea,photograph, or written work); a game; an activity; an idea or theory;another suitable concept; or two or more such concepts. A concept node204 may be associated with information of a concept provided by a useror information gathered by various systems, including social-networkingsystem 160. As an example and not by way of limitation, information of aconcept may include a name or a title; one or more images (e.g., animage of the cover page of a book); a location (e.g., an address or ageographical location); a website (which may be associated with a URL);contact information (e.g., a phone number or an email address); othersuitable concept information; or any suitable combination of suchinformation. In particular embodiments, a concept node 204 may beassociated with one or more data objects corresponding to informationassociated with concept node 204. In particular embodiments, a conceptnode 204 may correspond to one or more webpages.

In particular embodiments, a node in social graph 200 may represent orbe represented by a webpage (which may be referred to as a “profilepage”). Profile pages may be hosted by or accessible tosocial-networking system 160. Profile pages may also be hosted onthird-party websites associated with a third-party server 170. As anexample and not by way of limitation, a profile page corresponding to aparticular external webpage may be the particular external webpage andthe profile page may correspond to a particular concept node 204.Profile pages may be viewable by all or a selected subset of otherusers. As an example and not by way of limitation, a user node 202 mayhave a corresponding user-profile page in which the corresponding usermay add content, make declarations, or otherwise express himself orherself. As another example and not by way of limitation, a concept node204 may have a corresponding concept-profile page in which one or moreusers may add content, make declarations, or express themselves,particularly in relation to the concept corresponding to concept node204.

In particular embodiments, a concept node 204 may represent athird-party webpage or resource hosted by a third-party system 170. Thethird-party webpage or resource may include, among other elements,content, a selectable or other icon, or other inter-actable object(which may be implemented, for example, in JavaScript, AJAX, or PHPcodes) representing an action or activity. As an example and not by wayof limitation, a third-party webpage may include a selectable icon suchas “like,” “check in,” “eat,” “recommend,” or another suitable action oractivity. A user viewing the third-party webpage may perform an actionby selecting one of the icons (e.g., “eat”), causing a client system 130to transmit to social-networking system 160 a message indicating theuser's action. In response to the message, social-networking system 160may create an edge (e.g., an “eat” edge) between a user node 202corresponding to the user and a concept node 204 corresponding to thethird-party webpage or resource and store edge 206 in one or more datastores.

In particular embodiments, a pair of nodes in social graph 200 may beconnected to each other by one or more edges 206. An edge 206 connectinga pair of nodes may represent a relationship between the pair of nodes.In particular embodiments, an edge 206 may include or represent one ormore data objects or attributes corresponding to the relationshipbetween a pair of nodes. As an example and not by way of limitation, afirst user may indicate that a second user is a “friend” of the firstuser. In response to this indication, social-networking system 160 maytransmit a “friend request” to the second user. If the second userconfirms the “friend request,” social-networking system 160 may createan edge 206 connecting the first user's user node 202 to the seconduser's user node 202 in social graph 200 and store edge 206 associal-graph information in one or more of data stores (e.g., datastores associated with social-networking system 160). In the example ofFIG. 2, social graph 200 includes an edge 206 indicating a friendrelation between user nodes 202 of user “A” and user “B” and an edgeindicating a friend relation between user nodes 202 of user “C” and user“B.” Although this disclosure describes or illustrates particular edges206 with particular attributes connecting particular user nodes 202,this disclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202. As an example and not by way oflimitation, an edge 206 may represent a friendship, family relationship,business or employment relationship, fan relationship, followerrelationship, visitor relationship, subscriber relationship,superior/subordinate relationship, reciprocal relationship,non-reciprocal relationship, another suitable type of relationship, ortwo or more such relationships. Moreover, although this disclosuregenerally describes nodes as being connected, this disclosure alsodescribes users or concepts as being connected. Herein, references tousers or concepts being connected may, where appropriate, refer to thenodes corresponding to those users or concepts being connected in socialgraph 200 by one or more edges 206.

In particular embodiments, an edge 206 between a user node 202 and aconcept node 204 may represent a particular action or activity performedby a user associated with user node 202 toward a concept associated witha concept node 204. As an example and not by way of limitation, asillustrated in FIG. 2, a user may “like,” “attended,” “played,”“listened,” “cooked,” “worked at,” or “watched” a concept, each of whichmay correspond to a edge type or subtype. A concept-profile pagecorresponding to a concept node 204 may include, for example, aselectable “check in” icon (such as, for example, a clickable “check in”icon) or a selectable “add to favorites” icon. Similarly, after a userclicks these icons, social-networking system 160 may create a “favorite”edge or a “check in” edge in response to a user's action correspondingto a respective action. As another example and not by way of limitation,a user (user “C”) may listen to a particular song (“Ramble On”) using aparticular application (SPOTIFY, which is an online music application).In this case, social-networking system 160 may create a “listened” edge206 and a “used” edge (as illustrated in FIG. 2) between user nodes 202corresponding to the user and concept nodes 204 corresponding to thesong and application to indicate that the user listened to the song andused the application. Moreover, social-networking system 160 may createa “played” edge 206 (as illustrated in FIG. 2) between concept nodes 204corresponding to the song and the application to indicate that theparticular song was played by the particular application. In this case,“played” edge 206 corresponds to an action performed by an externalapplication (SPOTIFY) on an external audio file (the song “Imagine”).Although this disclosure describes particular edges 206 with particularattributes connecting user nodes 202 and concept nodes 204, thisdisclosure contemplates any suitable edges 206 with any suitableattributes connecting user nodes 202 and concept nodes 204. Moreover,although this disclosure describes edges between a user node 202 and aconcept node 204 representing a single relationship, this disclosurecontemplates edges between a user node 202 and a concept node 204representing one or more relationships. As an example and not by way oflimitation, an edge 206 may represent both that a user likes and hasused at a particular concept. Alternatively, another edge 206 mayrepresent each type of relationship (or multiples of a singlerelationship) between a user node 202 and a concept node 204 (asillustrated in FIG. 2 between user node 202 for user “E” and conceptnode 204 for “SPOTIFY”).

In particular embodiments, social-networking system 160 may create anedge 206 between a user node 202 and a concept node 204 in social graph200. As an example and not by way of limitation, a user viewing aconcept-profile page (such as, for example, by using a web browser or aspecial-purpose application hosted by the user's client system 130) mayindicate that he or she likes the concept represented by the conceptnode 204 by clicking or selecting a “Like” icon, which may cause theuser's client system 130 to transmit to social-networking system 160 amessage indicating the user's liking of the concept associated with theconcept-profile page. In response to the message, social-networkingsystem 160 may create an edge 206 between user node 202 associated withthe user and concept node 204, as illustrated by “like” edge 206 betweenthe user and concept node 204. In particular embodiments,social-networking system 160 may store an edge 206 in one or more datastores. In particular embodiments, an edge 206 may be automaticallyformed by social-networking system 160 in response to a particular useraction. As an example and not by way of limitation, if a first useruploads a picture, watches a movie, or listens to a song, an edge 206may be formed between user node 202 corresponding to the first user andconcept nodes 204 corresponding to those concepts. Although thisdisclosure describes forming particular edges 206 in particular manners,this disclosure contemplates forming any suitable edges 206 in anysuitable manner.

One feature supported by social-networking system 160 is to enable itsusers searching for other users in order to, for example, form socialconnections. This is especially helpful when users wish to reconnectwith friends and families with whom they have lost contact as timepasses. For example, suppose that a small group of users wishes toorganize a high school class reunion and thus needs to locate otherpeople from their class. However, they have not kept in touch with someof their classmates since graduation. Now ten years have passed and theyneed to locate their long-lost classmates. They may try to find theirclassmates through social-networking system 160, as their classmates mayalso belong to the same social-networking system 160.

A first user may try to locate a second user through social-networkingsystem 160 by sending a query to social-networking system 160 with thename (e.g., given name and surname) of the second user whom the firstuser is looking for. For example, the first user may send the name “MarySmith” to social-networking system 160. In response, social-networkingsystem 160 may present the first user with a list of users (i.e., thesearch result) whose names are “Mary Smith”. The first user may then tryto locate the right “Mary Smith” who is actually the second user thefirst user is looking for.

Sometimes, people may change their names due to various reasons. Forexample, a woman may change her surname to her husband's surname uponmarriage. In some states, such as California (based on the Name EqualityAct of 2007), a husband may also change his surname to his wife'ssurname upon marriage. A person may change his or her given name orsurname through proper court proceedings or upon becoming a naturalizedcitizen of the United States. Name change may cause problems, in somecases, when a first user is trying to locate a second user by name.

As an example, suppose that during the time period when the first userand the second user had lost contact with each other, the second user,whose maiden name is “Mary Smith”, has gotten married and consequentlyhas changed her name to “Mary Clark”, as her husband's name is “ThomasClark”. In this case, the second user's current profile withsocial-networking system 160 actually has the name of the second user as“Mary Clark”. On the other hand, since the first user is unaware of thesecond user's marriage and name change, the first user still believesthe second user's name is “Mary Smith” (i.e., the second user's maidenname). In this case, when the first user searches for the second userusing the name “Mary Smith”, social-networking system 160 may notinclude the user whose name is “Mary Clark”, as indicated by the seconduser's profile with social-networking system 160, in the list of userspresented to the first user. As a result, the first user is unable tofind the second user using the name “Mary Smith”.

As another example, suppose that the second user has gotten married andconsequently has changed her name to “Mary Smith”, as her husband's nameis “Michael Smith”. However, the profile of the second user withsocial-networking system 160 still has her name as “Mary Jones”, whichis the second user's maiden name (e.g., the second user has not or doesnot want to update her profile with social-networking system 160 afterher marriage). Further suppose that the first user does not know thesecond user's maiden name (e.g., because the first user has met thesecond user after the second user's marriage) but only knows the seconduser by the name “Mary Smith”. In this case, when the first usersearches for the second user using the name “Mary Smith”,social-networking system 160 may not include the user whose name is“Mary Jones”, as indicated by the second user's profile withsocial-networking system 160, in the list of users presented to thefirst user. As a result, again the first user is unable to find thesecond user using the name “Mary Smith”.

In particular embodiments, social-networking system 160 may take intoaccount each user's social connections, and especially familyconnections, when locating users who match a specific name. FIG. 3illustrates an example method 300 for locating users based on familyconnections.

Method 300 may begin at STEP 310, where a name, including a given name(e.g., first name or Christian name) and a surname (e.g., last name orfamily name), is received by social-networking system 160. The name maybe submitted by a user of social-networking system 160 in an attempt tofind another user of social-networking system 160 who matches that name.In response, one or more users of social-networking system 160 matchingthe received name may be located.

In particular embodiments, social-networking system 160 may examineinformation associated with each of its users to locate those specificusers whose names (e.g., according to each user's profile name) matchthe name received by social-networking system 160 at STEP 310. This maybe done iteratively (e.g., in a loop). During each iteration, STEPS320-370 may be performed to examine one particular user ofsocial-networking system 160.

At STEP 320, a user (e.g., User X, for purpose of clarification), whohas not been examined, is selected. For example, a temporary flag ormarker may be associated with each user of social-networking system 160to indicate whether a particular user has already been examined. Withsome implementations, the marker may be represented as a Booleanvariable. Initially, the markers associated with all the users are setto FALSE. After a user has been examined, the marker associated withthat user is set to TRUE. The marker thus indicates whether anassociated user has been examined. The given name and surname of User Xmay be determined based on User X's profile (i.e. User X's profile name)with social-networking system 160.

At STEP 330, User X's given name, from User X's profile name, iscompared against the given name received by social-networking system 160at STEP 310. If User X's given name matches the received given name,then method 300 proceeds to STEP 340. Otherwise, method 300 process toSTEP 370.

At STEP 340, User X's surname, from User X's profile name, is comparedagainst the surname received by social-networking system 160 at STEP310. If User X's surname matches the received surname, then method 300proceeds to STEP 350. Otherwise, method 300 process to STEP 360.

At STEP 350, User X is included in a list of users (i.e., the searchresult). All the users on this list are considered to match (i.e.,satisfy) the name received by social-networking system 160 at STEP 310.

At STEP 360 (i.e., when User X's given name matches the received givenname but User X's surname does not match the received surname), User X'ssocial connections, and especially family connections, are examined.With some implementations, a user's family connections may include, forexample and without limitation, the user's parent (e.g., father,mother), step parent, sibling (e.g., brother, sister), child (e.g., son,daughter), or spouse (e.g., husband, wife). User X's social or familyconnections may be determined from User X's profile withsocial-networking system 160 or from information stored in social graph200. The surnames of User X's family connections are compared againstthe surname received by social-networking system 160 at STEP 310. If thesurname of at least one of User X's family connections matches thereceived surname, then method 300 proceeds to STEP 350, where User X isincluded in the search result (i.e., the list of users). Otherwise,method 300 process to STEP 370.

In the first example scenario described above, where the second user“Mary Smith” has married “Thomas Clark” and changed her name to “MaryClark”, and where the second user's profile name with social-networkingsystem 160 is now “Mary Clark”, suppose that the first user submits thename “Mary Smith” to social-networking system 160. In this case, basedon the second user's profile name, the second user's given name (i.e.,“Mary”) matches the received given name, but the second user's surname(i.e., “Clark”) does not match the received surname (i.e., “Smith”).However, further suppose that the second user's family connections(e.g., as indicated in the second user's profile with social-networkingsystem 160) include the second user's father whose name is “David Smith”or the second user's brother whose name is “Kevin Smith”. The surname(i.e., “Smith”) of the second user's father or brother matches thereceived surname. As a result, the second user is still included in thesearch result for “Mary Smith” at STEP 350 even though the surname(i.e., “Clark”) of her own current profile name does not match thereceived surname (i.e., “Smith”).

In the second example scenario described above, where the second user“Mary Jones” has married “Michael Smith”, and where the second user'sprofile name with social-networking system 160 is still her maiden name“Mary Jones”, suppose that the first user submits the name “Mary Smith”to social-networking system 160. In this case, based on the seconduser's profile name, the second user's given name (i.e., “Mary”) matchesthe received given name, but the second user's surname (i.e., “Jones”)does not match the received surname (i.e., “Smith”). However, furthersuppose that the second user's family connections (e.g., as indicated inthe second user's profile with social-networking system 160) include thesecond user's husband whose name is “Michael Smith”. The surname (i.e.,“Smith”) of the second user's husband matches the received surname. As aresult, the second user is still included in the search result for “MarySmith” at STEP 350 even though the surname (i.e., “Jones”) her currentprofile name does not match the received surname (i.e., “Smith”).

As these two examples illustrate, even when User X's surname, from UserX's profile name at social-networking system 160, does not match thesurname received by social-networking system 160 at STEP 310, if User Xhas at least one family connection whose surname matches the receivedsurname, User X may still be included in the search result.

At STEP 370, if there are more users who have not been examined, theloop repeats for another iteration, starting again at STEP 320 to selectanother user who has not been examined. Otherwise, the loop ends.

The search result (e.g., a list of users) obtained using method 300includes two types of users. First, based on a user's profile name atsocial-networking system 160, each user whose given name matches thegiven name specified in the search query and whose surname matches thesurname specified in the search query is included in the search result.Second, based on a user's profile name and family connections atsocial-networking system 160, each user whose given name matches thespecified given name but whose surname does not match the specifiedsurname and who has at least one family connection whose surname matchesthe specified surname is included in the search result. All other usersare not included in the search result. Subsequently, the search result(e.g., the list of users) may be sent to and presented to the userrequesting the search.

In particular embodiments, when presenting each user in the searchresult, the user's given name and surname, according to the user'sprofile name, are displayed. In addition, if one of the user's familyconnections is used during the search (e.g., to determine an alternativesurname for the user), the user's family connection is also displayed.For example, the given name and surname of the user's family connectionand the relationship (e.g., father, brother, husband, etc.) with theuser may be displayed.

An example search result 500 for the example query “Mary Smith” isillustrated in FIG. 5, which includes several users. For example, user510's profile name is “Mary Smith”, which matches the name specified inthe example query exactly (i.e., both given name and surname match). Inthis case, the family connections of user 510 are not used and thus arenot displayed. On the other hand, user 520's profile name is “MaryJones”. User 520's given name matches the given name specified in theexample query, but user 520's surname does not match the surnamespecified in the example query. However, user 520 is still included inthe search result because she is the wife of “Michael Smith”. In thiscase, the relevant family connection of user 520 for the search is herhusband. Thus, the name of her husband (i.e., “Michael Smith”) and herrelationship to “Michael Smith” (i.e., “wife”) are also displayed.

In particular embodiments, a user of social-networking system 160 mayprovide many types of information concerning the user tosocial-networking system 160. Social-networking system 160 may in turnstore the user's information in connection with the user (e.g., in theuser's profile or in social graph 200). For example, a user'sinformation may include, without limitation, the user's social andfamily connections (e.g., friends, colleagues, parents, siblings,children, spouse, etc.), demographic data (e.g., birth date, birthplace, age, gender, marital status, family status, etc.), backgrounddata (e.g., education, employment, profession, residence, etc.),interests and hobbies, activities, etc.

In particular embodiments, to protect user privacy, social-networkingsystem 160 may enable a user to specify (e.g., through privacy settings)which piece of the user's information the user is willing to sharepublicly and which piece of the user's information the user wishes tokeep private (e.g., only the user himself or herself can view or only aspecific list of other users, such as the user's friends, can view).

When displaying search result 500 as illustrated in FIG. 5, for user 520(i.e., profile name “Mary Jones”, wife of “Michael Smith”), the familyconnection used for the search is her husband. Suppose that user 520 hasset this piece of information (i.e., the husband-wife connection)“public” so that anyone can obtain this piece of information. Therefore,it does not violate user 520's privacy settings to display the name ofuser 520's husband (i.e., “Michael Smith”) and the relationship (i.e.,husband and wife) between them.

On the other hand, for user 530 (i.e., profile name “Mary Clark”,daughter of “David Smith”), the family connection used for the search isher father. Suppose that user 530 has set this piece of information(i.e., the father-daughter connection) “private” so that it should notbe shared with the general public. It would violate user 530's privacysettings to display the relationship (i.e., father and daughter) betweenuser 530 and her father (i.e., “David Smith”). Instead, in particularembodiments, a substitute relationship (e.g., friend) may be displayedto obfuscate the private father-daughter relationship and to protectuser 530's privacy, as illustrated in FIG. 5.

Family connections are not the only type of user information that may beused to locate specific users in social-networking system 160. Inparticular embodiments, any available user information, public orprivate, may be used during a user search process. FIG. 4 illustrates anexample method 400 for locating users based information stored in asocial-networking system.

Method 400 may begin at STEP 410, where one or more criteria arereceived by social-networking system 160. The criteria may be submittedby a user of social-networking system 160 in an attempt to find one ormore other users of social-networking system 160 who satisfy thesecriteria. The search criteria may include any type of user information,such as, for example and without limitation, name (e.g., given name orsurname or both), age, location (e.g., residential city or state),profession, or employment (e.g., employer's name). In response, one ormore users of social-networking system 160 satisfying the criteria maybe located.

In particular embodiments, social-networking system 160 may examineavailable information associated with each of its users to locate thosespecific users who satisfy the criteria received by social-networkingsystem 160 at STEP 410. This may be done iteratively (e.g., in a loop).During each iteration, STEPS 420-450 may be performed to examine oneparticular user of social-networking system 160.

At STEP 420, a user (e.g., User X, for purpose of clarification), whohas not been examined, is selected. For example, a temporary flag ormarker may be associated with each user of social-networking system 160to indicate whether a particular user has already been examined. Withsome implementations, the marker may be represented as a Booleanvariable. Initially, the markers associated with all the users are setto FALSE. After a user has been examined, the marker associated withthat user is set to TRUE. The marker thus indicates whether anassociated user has been examined. The information associated with UserX may be obtained from User X's profile or social graph 200.

At STEP 430, available information of User X may be examined todetermine whether User X satisfies the criteria received at STEP 410.With some implementations, only public information of User X (e.g., asdetermined based on User X's privacy settings) is used. Alternatively,with some implementations, both public and private information of User X(e.g., as determined based on User X's privacy settings) is use. If UserX satisfies the received criteria, method 400 proceeds to STEP 440,where User X is included in the search result. Otherwise, method 400proceeds to STEP 450.

As an example, suppose that the criteria received at STEP 410 include aname (e.g., “Mary Smith”). For user 530 (i.e., profile name “MaryClark”, daughter of “David Smith”), based on user 530's profile givenname and user 530's family connection with her father (i.e., “DavidSmith”), user 530 satisfies the received search criteria. Thus, user 530is included in the search result.

As another example, suppose that the criteria received at STEP 410include a name (e.g., “Mary Smith”) and a city (e.g., “San Francisco”).For user 510 (i.e., profile name “Mary Smith”), in addition to user510's profile name, if user 510's information indicates that user 510lives or works in “San Francisco”, then user 510 satisfies the receivedsearch criteria and is included in the search result. On the other hand,if user 510's information indicates that user 510 has no connection orassociation with the city of “San Francisco”, then user 510 does notsatisfy the received search criteria and is not included in the searchresult.

As a third example, suppose that the criteria received at STEP 410include a name (e.g., “Mary Smith”) and a company (e.g., “Facebook”).For user 520 (i.e., profile name “Mary Jones”, wife of “Michael Smith”),in addition to user 520's profile name and husband-wife familyconnection, if user 520's information indicates that user 520 works at“Facebook”, then user 520 satisfies the received search criteria and isincluded in the search result. On the other hand, if user 520'sinformation indicates that user 520 has no connection or associationwith the company “Facebook”, then user 520 does not satisfy the receivedsearch criteria and is not included in the search result.

At STEP 440, User X is included in a list of users (i.e., the searchresult). All the users on this list are considered to satisfy thecriteria received by social-networking system 160 at STEP 410, based oneach user's available information, public or private, atsocial-networking system 160.

At STEP 450, if there are more users who have not been examined, theloop repeats for another iteration, starting again at STEP 420 to selectanother user who has not been examined. Otherwise, the loop ends. At theend of the loop, the search result (e.g., the list of users) includesthose users who satisfy the criteria received by social-networkingsystem 160 at STEP 410.

At STEP 460, the search result (e.g., the list of users) may be sent toand presented to the user requesting the search. In particularembodiments, when displaying the users in the search result, for eachuser, the profile name of the user is displayed. In addition, for theuser's information that is relevant to the search criteria and usedduring the search, if a piece of information is publicly shared by theuser (e.g., through privacy settings), the piece of information isdisplayed as it is, and if a piece of information is not publicly sharedby the user, a substitute piece of information is displayed to obfuscatethe user's private information and protect the user's privacy.

For example, as illustrated in FIG. 5, for user 520 (i.e., profile name“Mary Jones”, wife of “Michael Smith”), the husband-wife connection ofuser 520 is relevant to the search criteria. Since user 520 publiclyshares this piece of information (i.e., the husband-wife connection),the relationship between user 520 and her husband (i.e., “MichaelSmith”) is displayed as it is. On the other hand, for user 530 (i.e.,profile name “Mary Clark”, daughter of “David Smith”), thefather-daughter connection of user 530 is relevant to the searchcriteria. However, since user 530 does not publicly share this piece ofinformation (i.e., the father-daughter connection), the relationshipbetween user 530 and her father (i.e., “David Smith”) is not displayed.Instead, a substitute relationship (e.g., “friend”) is displayed.

Suppose that there is a connection (e.g., family connection) between twousers (e.g., User X and User Y, for purpose of clarification). User Xmay specify a privacy setting for this connection in User X's profile.Similarly, User Y may also specify a privacy setting for this sameconnection in User Y's profile, which may or may not be the same as UserX's privacy setting for the connection. In particular embodiments,during a search for specific users based on one or more search criteria,if User X is the user being examined and the connection between Users Xand Y is needed to determined whether User X satisfies the searchcriteria and should be included in the search result, User X's privacysetting for the connection controls and determines whether theconnection needs to be obfuscated (e.g., when User X is displayed as apart of the search result). On the other hand, if User Y is the userbeing examined and the connection between Users X and Y is needed todetermined whether User Y satisfies the search criteria and should beincluded in the search result, User Y's privacy setting for theconnection controls and determines whether the connection needs to beobfuscated (e.g., when User Y is displayed as a part of the searchresult).

Thus, suppose that User X's privacy setting for the connection betweenUsers X and Y is “public” and User Y's privacy setting for theconnection between Users X and Y is “private”. When User X is displayedas a part of the search result, if the connection is relevant to thesearch criteria, the connection is displayed as it is, withoutsubstitution, since User X's privacy setting for the connection is“public”. On the other hand, when User Y is displayed as a part of thesearch result, if the connection is relevant to the search criteria, theconnection is not displayed; instead, a substitute connection isdisplayed, since User Y's privacy setting for the connection is“private”.

In particular embodiments, a more general public piece of informationmay be used to obfuscate a more specific private piece of information. Asubstitute piece of information for a private piece of information maybe selected based on the private piece of information that needs to beobfuscated. For example, if the private piece of information is a familyconnection, the substitute piece of information may be a general socialconnection (e.g., “friend”). If the private piece of information is alocation (e.g., a city), the substitute piece of information may be amore granular location (e.g., the state in which the city is located).If the private piece of information is a company, the substitute pieceof information may be an industry to which the company's businessbelongs.

In particular embodiments, to obfuscate a user's private information,the search result may include one or more additional users who do notsatisfy the search criteria themselves but who may be close friends to(e.g., have high coefficient with) the user whose private informationneeds to be protected. As an example, in FIG. 5, for user 530 (i.e.,profile name “Mary Clark”, daughter of “David Smith”), thefather-daughter connection between user 530 and her father (i.e., “DavidSmith”) is substituted with a “friend” connection. However, since searchresult 500 should include those users whose names are “Mary Smith”, thefact that user 530 is included in search result 500 and the informationthat user 530 is “friend” of “David Smith” may suggest that user 530 hasat least a family connection (e.g., possibly father-daughter orbrother-sister connection) with “David Smith” and not just merely a“friend” of “David Smith”. To further protect user 530's father-daughterconnection with “David Smith”, search result 500 may include one or moreadditional users, who have close relationships with user 530 but whosenames are not necessarily “Mary Smith”. These additional users may alsobe shown as “friends” of “David Smith” even if they have no actualconnections with “David Smith”, and thus further obfuscating or cloakinguser 530 among them.

In particular embodiments, public information of the users may be usedin place of a user's private information so that it is not necessary touse the user's private information during a search. As an example,suppose that a search query requests for users working at “Facebook”.Further suppose that User X works at “Facebook” but User X has specifiedthat his employer information is “private”. With some implementations,if User X has a social connection with User Y, which is a “public”connection, and User Y also works at “Facebook”, User X may be locatedby first locating User Y, who works at “Facebook”, and then tracing thepublic connection from User Y back to User X after User Y has beenlocated. In this case, User X's private information (i.e., his employerinformation) is not actually used during the search. In other words, inparticular embodiments, a first user, who satisfies the search criteria,may be located by tracing the public connections from a second user backto the first user without using the first user's private information.

Particular embodiments may repeat one or more steps of the methods ofFIGS. 3-4, where appropriate. Although this disclosure describes andillustrates particular steps of the methods of FIGS. 3-4 as occurring ina particular order, this disclosure contemplates any suitable steps ofthe methods of FIGS. 3-4 occurring in any suitable order. Moreover,although this disclosure describes and illustrates particularcomponents, devices, or systems carrying out particular steps of themethods of FIGS. 3-4 this disclosure contemplates any suitablecombination of any suitable components, devices, or systems carrying outany suitable steps of the methods of FIGS. 3-4.

Methods 300 and 400 may be implemented as computer software and executedon a computer system. FIG. 6 illustrates an example computer system 600.In particular embodiments, one or more computer systems 600 perform oneor more steps of one or more methods described or illustrated herein. Inparticular embodiments, one or more computer systems 600 providefunctionality described or illustrated herein. In particularembodiments, software running on one or more computer systems 600performs one or more steps of one or more methods described orillustrated herein or provides functionality described or illustratedherein. Particular embodiments include one or more portions of one ormore computer systems 600. Herein, reference to a computer system mayencompass a computing device, and vice versa, where appropriate.Moreover, reference to a computer system may encompass one or morecomputer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems600. This disclosure contemplates computer system 600 taking anysuitable physical form. As example and not by way of limitation,computer system 600 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, a tablet computer system, or acombination of two or more of these. Where appropriate, computer system600 may include one or more computer systems 600; be unitary ordistributed; span multiple locations; span multiple machines; spanmultiple data centers; or reside in a cloud, which may include one ormore cloud components in one or more networks. Where appropriate, one ormore computer systems 600 may perform without substantial spatial ortemporal limitation one or more steps of one or more methods describedor illustrated herein. As an example and not by way of limitation, oneor more computer systems 600 may perform in real time or in batch modeone or more steps of one or more methods described or illustratedherein. One or more computer systems 600 may perform at different timesor at different locations one or more steps of one or more methodsdescribed or illustrated herein, where appropriate.

In particular embodiments, computer system 600 includes a processor 602,memory 604, storage 606, an input/output (I/O) interface 608, acommunication interface 610, and a bus 612. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 602 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 602 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 604, or storage 606; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 604, or storage 606. In particular embodiments, processor602 may include one or more internal caches for data, instructions, oraddresses. This disclosure contemplates processor 602 including anysuitable number of any suitable internal caches, where appropriate. Asan example and not by way of limitation, processor 602 may include oneor more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 604 or storage 606, andthe instruction caches may speed up retrieval of those instructions byprocessor 602. Data in the data caches may be copies of data in memory604 or storage 606 for instructions executing at processor 602 tooperate on; the results of previous instructions executed at processor602 for access by subsequent instructions executing at processor 602 orfor writing to memory 604 or storage 606; or other suitable data. Thedata caches may speed up read or write operations by processor 602. TheTLBs may speed up virtual-address translation for processor 602. Inparticular embodiments, processor 602 may include one or more internalregisters for data, instructions, or addresses. This disclosurecontemplates processor 602 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 602may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 602. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 604 includes main memory for storinginstructions for processor 602 to execute or data for processor 602 tooperate on. As an example and not by way of limitation, computer system600 may load instructions from storage 606 or another source (such as,for example, another computer system 600) to memory 604. Processor 602may then load the instructions from memory 604 to an internal registeror internal cache. To execute the instructions, processor 602 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 602 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor602 may then write one or more of those results to memory 604. Inparticular embodiments, processor 602 executes only instructions in oneor more internal registers or internal caches or in memory 604 (asopposed to storage 606 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 604 (as opposedto storage 606 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 602 tomemory 604. Bus 612 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 602 and memory 604 and facilitateaccesses to memory 604 requested by processor 602. In particularembodiments, memory 604 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 604 may include one ormore memories 604, where appropriate. Although this disclosure describesand illustrates particular memory, this disclosure contemplates anysuitable memory.

In particular embodiments, storage 606 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 606may include a hard disk drive (HDD), a floppy disk drive, flash memory,an optical disc, a magneto-optical disc, magnetic tape, or a UniversalSerial Bus (USB) drive or a combination of two or more of these. Storage606 may include removable or non-removable (or fixed) media, whereappropriate. Storage 606 may be internal or external to computer system600, where appropriate. In particular embodiments, storage 606 isnon-volatile, solid-state memory. In particular embodiments, storage 606includes read-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 606 taking any suitable physicalform. Storage 606 may include one or more storage control unitsfacilitating communication between processor 602 and storage 606, whereappropriate. Where appropriate, storage 606 may include one or morestorages 606. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 608 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 600 and one or more I/O devices. Computer system600 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 600. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 608 for them. Where appropriate, I/O interface 608 mayinclude one or more device or software drivers enabling processor 602 todrive one or more of these I/O devices. I/O interface 608 may includeone or more I/O interfaces 608, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 610 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 600 and one or more other computer systems 600 or one ormore networks. As an example and not by way of limitation, communicationinterface 610 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 610 for it. As an example and not by way of limitation,computer system 600 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 600 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 600 may include any suitable communication interface 610 for anyof these networks, where appropriate. Communication interface 610 mayinclude one or more communication interfaces 610, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 612 includes hardware, software, or bothcoupling components of computer system 600 to each other. As an exampleand not by way of limitation, bus 612 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 612may include one or more buses 612, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,functions, operations, or steps, any of these embodiments may includeany combination or permutation of any of the components, elements,functions, operations, or steps described or illustrated anywhere hereinthat a person having ordinary skill in the art would comprehend.Furthermore, reference in the appended claims to an apparatus or systemor a component of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A computer-implemented method comprising:receiving, at a social-networking system, a query from a client deviceof a first user specifying one or more criteria; accessing, by thesocial-networking system, a data store comprising information associatedwith one or more users of the social-networking system; identifying, bythe social-networking system, a plurality of users of thesocial-networking system based on the query, wherein the plurality ofusers comprise: a second user identified based on private informationstored in the data store and the one or more criteria, wherein theprivate information is not viewable by the first user; and a third useridentified based on non-private information stored in the data store andthe one or more criteria, wherein the non-private information isviewable by the first user, and wherein the third user is identifiedresponsive to the identifying of the second user based on privateinformation; and sending, to the client device of the first user, aplurality of search results responsive to the query, wherein the searchresults comprise information associated with at least the second andthird users, and wherein the information associated with the second usercomprises substitute information associated with the second user inplace of the private information, the substitute information beinginformation that is viewable by the first user.
 2. The method of claim1, further comprising: accessing a social graph comprising a pluralityof nodes and a plurality of edges connecting the nodes, each of theedges between two of the nodes representing a single degree ofseparation between them, the nodes comprising: a first nodecorresponding to the first user; and a plurality of user nodescorresponding to the plurality of users of the online social network,respectively.
 3. The method of claim 1, wherein the substituteinformation is public information.
 4. The method of claim 1, wherein theprivate information comprises a relationship between the second user anda third user and the substitute information is a more genericrelationship between the second user and the third user.
 5. The methodof claim 1, wherein the private information is deemed private based on aprivacy setting specified by the second user, the privacy settingspecifying that the private information is not viewable by the firstuser.
 6. The method of claim 1, wherein the private information isdeemed private based on a privacy setting specified by the second user,the privacy setting specifying that the private information is viewableonly by a group of users, the group of users not including the firstuser.
 7. The method of claim 1, wherein the private informationcomprises a relationship between the second user and a third user, theprivate information being deemed private based on a privacy settingspecified by the third user, the privacy setting specifying that theprivate information is not viewable by the first user.
 8. The method ofclaim 1, wherein the private information comprises a relationshipbetween the second user and a third user, the private information beingdeemed private based on a privacy setting specified by the second user,the privacy setting specifying that the private information is notviewable by the first user.
 9. The method of claim 1, whereinidentifying the second user comprises: selecting a user from theplurality of users; and determining whether the selected user satisfiesone or more of the criteria based on the private information.
 10. Themethod of claim 1, wherein the third user does not satisfy the searchcriteria, and wherein the third user is a connection of the second user.11. The method of claim 1, wherein the non-private information comprisespublic information, wherein the public information is information thatis viewable by the general public.
 12. The method of claim 1, wherein,for each of the plurality of users, the information of the usercomprises one or more family connections of the user, one or more friendconnections of the user, one or more demographic data of the user, orone or more one or more background data of the user.
 13. The method ofclaim 12, wherein, for each of the plurality of users, the one or morefamily connections of the user comprise one or more of parent, sibling,child, or spouse.
 14. The method of claim 12, wherein, for each of theplurality of users, the one or more demographic data of the usercomprise one or more of birth date, birth place, age, gender, or maritalstatus.
 15. The method of claim 12, wherein, for each of the pluralityof users, the one or more background data of the user comprise one ormore of education, employment, or residence.
 16. The method of claim 1,wherein the information associated with the third user is included inthe search results to obfuscate the private information of the seconduser.
 17. One or more computer-readable non-transitory storage mediaembodying software that is operable when executed to: receive a queryfrom a client device of a first user specifying one or more criteria;access a data store comprising information associated with one or moreusers of the social-networking system; identify, by thesocial-networking system, a plurality of users of the social-networkingsystem based on the query, wherein the plurality of users comprise: asecond user identified based on private information stored in the datastore and the one or more criteria, wherein the private information isnot viewable by the first user; and a third user identified based onnon-private information stored in the data store and the one or morecriteria, wherein the non-private information is viewable by the firstuser, and wherein the third user is identified responsive to theidentifying of the second user based on private information; and send,to the client device of the first user, a plurality of search resultsresponsive to the query, wherein the search results comprise informationassociated with at least the second and third users, and wherein theinformation associated with the second user comprises substituteinformation associated with the second user in place of the privateinformation, the substitute information being information that isviewable by the first user.
 18. A system comprising: one or moreprocessors; and a non-transitory memory coupled to the processorscomprising instructions executable by the processors, the processorsoperable when executing the instructions to: receive a query from aclient device of a first user specifying one or more criteria; access adata store comprising information associated with one or more users ofthe social-networking system; identify, by the social-networking system,a plurality of users of the social-networking system based on the query,wherein the plurality of users comprise: a second user identified basedon private information stored in the data store and the one or morecriteria, wherein the private information is not viewable by the firstuser; and a third user identified based on non-private informationstored in the data store and the one or more criteria, wherein thenon-private information is viewable by the first user, and wherein thethird user is identified responsive to the identifying of the seconduser based on private information; and send, to the client device of thefirst user, a plurality of search results responsive to the query,wherein the search results comprise information associated with at leastthe second and third users, and wherein the information associated withthe second user comprises substitute information associated with thesecond user in place of the private information, the substituteinformation being information that is viewable by the first user. 19.The system of claim 18, wherein the processors are further operable whenexecuting the instructions to: access a social graph comprising aplurality of nodes and a plurality of edges connecting the nodes, eachof the edges between two of the nodes representing a single degree ofseparation between them, the nodes comprising: a first nodecorresponding to the first user; and a plurality of user nodescorresponding to the plurality of users of the online social network,respectively.
 20. The system of claim 18, wherein the substituteinformation is public information.
 21. The system of claim 18, whereinthe private information comprises a relationship between the second userand a third user and the substitute information is a more genericrelationship between the second user and the third user.
 22. The systemof claim 18, wherein the private information is deemed private based ona privacy setting specified by the second user, the privacy settingspecifying that the private information is not viewable by the firstuser.
 23. The system of claim 18, wherein the private information isdeemed private based on a privacy setting specified by the second user,the privacy setting specifying that the private information is viewableonly by a group of users, the group of users not including the firstuser.
 24. The system of claim 18, wherein the private informationcomprises a relationship between the second user and a third user, theprivate information being deemed private based on a privacy settingspecified by the third user, the privacy setting specifying that theprivate information is not viewable by the first user.
 25. The system ofclaim 18, wherein the private information comprises a relationshipbetween the second user and a third user, the private information beingdeemed private based on a privacy setting specified by the second user,the privacy setting specifying that the private information is notviewable by the first user.
 26. The system of claim 18, wherein theinstructions to identify the second user comprises instructions to:select a user from the plurality of users; and determine whether theselected user satisfies one or more of the criteria based on the privateinformation.
 27. The system of claim 18, wherein the third user does notsatisfy the search criteria, and wherein the third user is a connectionof the second user.
 28. The system of claim 18, wherein the non-privateinformation comprises public information, wherein the public informationis information that is viewable by the general public.
 29. The system ofclaim 18, wherein, for each of the plurality of users, the informationof the user comprises one or more family connections of the user, one ormore friend connections of the user, one or more demographic data of theuser, or one or more one or more background data of the user.
 30. Thesystem of claim 29, wherein, for each of the plurality of users, the oneor more family connections of the user comprise one or more of parent,sibling, child, or spouse.
 31. The system of claim 29, wherein, for eachof the plurality of users, the one or more demographic data of the usercomprise one or more of birth date, birth place, age, gender, or maritalstatus.
 32. The system of claim 29, wherein, for each of the pluralityof users, the one or more background data of the user comprise one ormore of education, employment, or residence.
 33. The system of claim 18,wherein the information associated with the third user is included inthe search results to obfuscate the private information of the seconduser.